package cn.smdq.ch.upms.admin.pay.controller;

import cn.smdq.ch.common.vo.Result;
import cn.smdq.ch.upms.admin.pay.body.PayBody;
import cn.smdq.ch.upms.admin.pay.service.PayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shuimodanqing
 * create at:  2019/1/29  2:57 PM
 * @description 支付接口
 */
@RestController
@RequestMapping("/pay")
@Api(value = "支付中心", tags = "支付中心")
public class PayController {

    private PayService payService;

    public PayController(PayService payService) {
        this.payService = payService;
    }

    @ApiOperation("支付")
    @PostMapping
    public Result pay(@RequestBody PayBody payBody) {
        return payService.pay(payBody);
    }
}
